<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreatePostersTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('posters', function (Blueprint $table) {
            $table->increments('id');
            $table->string('domain')->nullable()->comment('所属行业');
            $table->integer('spId')->default(0)->nullable()->unsigned()->comment('服务商');
            $table->string('dataType')->nullable()->comment('数据类型');
            $table->string('metaType')->nullable()->comment('元数据类型');
            $table->string('metaId')->nullable()->comment('元数据ID');
            $table->string('posterId')->nullable()->comment('主海报Id');
            $table->string('thumbnail')->nullable()->comment('缩略图');
            $table->string('tags')->nullable()->comment('图片标签');
            $table->string('title')->nullable()->comment('图片标题');
            $table->string('subtitle')->nullable()->comment('图片副标题');
            $table->text('short_desc')->nullable()->comment('图片简介');
            $table->text('detail')->nullable()->comment('详情');
            $table->text('working')->nullable()->comment('工作态');
            $table->string('status')->nullable()->comment('审核态');
            $table->dateTime('expire_at')->nullable()->comment('失效时间');
            $table->integer('listorder')->default(0)->nullable()->unsigned()->comment('排序字段');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('posters');
    }
}
